package com.viewsky.base;

import javax.annotation.Resource;

import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import com.viewsky.base.service.RedisLoader;

@SpringBootApplication
public class Main implements CommandLineRunner
{
	@Resource(name="redisLoader")
	private RedisLoader redisLoader;
	
	public static void main(String[] args)
	{
		SpringApplication springApplication = new SpringApplication(Main.class);
//    springApplication.setBannerMode(Banner.Mode.OFF);
    springApplication.run(args);
	}
	
	@Override
  public void run(String... args) throws Exception 
	{
		redisLoader.loadUser();
		redisLoader.loadOrganization();
		redisLoader.loadCodeInfo();
  }
}
